import { Column, CreateDateColumn, Entity, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
import { PermissionControlEntity } from '../permission-control/permission-control.entity';

@Entity('roles')
export class RoleEntity {

  @PrimaryGeneratedColumn()
  id: number;

  @Column({
    name: 'role_name',
    unique: true,
  })
  roleName: string;

  @Column({
    length: 1024,
  })
  description: string;

  @CreateDateColumn({
    name: 'created_at',
  })
  createdAt;

  @UpdateDateColumn({
    name: 'updated_at',
  })
  updatedAt;

  @Column({
    name: 'deleted_at',
    type: 'datetime',
    nullable: true,
    select: false,
  })
  deletedAt: Date;
}
